#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void leftround(char* str, int k)
{
	int sz = strlen(str);
	int time = k % sz;
	int j = 0;
	int i = 0;
	for (i = 0; i < time; i++)
	{
		int tmp = str[0];
		for (j = 0; j < sz - 1; j++)
		{
			str[j] = str[j + 1];
		}
		str[j] = tmp;
	}
	i = 0;
	for (i = 0; i < sz; i++)
	{
		printf("%c ", str[i]);
	}
}

int main()
{
	char str[] = "abcdef";
	int k = 0;
	scanf("%d", &k);
	leftround(str, k);
	return 0;
}